#include "StopFrameButton.h"


StopFrameButton::StopFrameButton(const char aPosition, const string &aName) {
    this->theYPosition = aPosition;
    this->theName = aName;
}

StopFrameButton::~StopFrameButton() {
}

void StopFrameButton::run(Frame &aFrame, Event &anEvent) {
    if(this->theYPosition == anEvent.getY()) {
        aFrame.stop();
    }
}

string StopFrameButton::toString() {
    return this->theName;
}
